package com.yelobblog.yelobblog.controller;

import com.yelobblog.yelobblog.common.untils.Response;
import com.yelobblog.yelobblog.domain.entity.category;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yelobblog.yelobblog.service.categoryService;

import java.util.List;

@RestController
@RequestMapping("/category")
public class categoryController {
    @Resource
    private categoryService categoryService;
    @RequestMapping("/get")
    public Response<List<category>> get() {
        return Response.success(categoryService.list());
    }
}
